package com.qa.controller.admin;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/test/")
@Api(tags = "管理端测试接口")
public class HelloController {

    @ApiOperation("测试接口")
    @GetMapping("/hello")
    @PreAuthorize("hasAuthority('authority_admin')")
    public String hello(){
        System.out.println("success");
        return "hello";
    }
}
